﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Game.model;
using gnu.trove.map.hash;
using java.lang;
using java.util;

namespace Game.templates
{
    public class CubicTemplate
    {
        public  class SkillInfo
        {
            private Skill _skill;
		    /**
		     * Field _chance.
		     */
		    private int _chance;
		    /**
		     * Field _actionType.
		     */
		    private ActionType _actionType;
		    /**
		     * Field _canAttackDoor.
		     */
		    private bool _canAttackDoor;
		    /**
		     * Field _chanceList.
		     */
		    private TIntIntHashMap _chanceList;
            public SkillInfo(Skill skill, int chance, ActionType actionType, bool canAttackDoor, TIntIntHashMap set)
            {
                _skill = skill;
                _chance = chance;
                _actionType = actionType;
                _canAttackDoor = canAttackDoor;
                _chanceList = set;
            }
            public int getChance()
            {
                return _chance;
            }
            public ActionType getActionType()
            {
                return _actionType;
            }
            public Skill getSkill()
            {
                return _skill;
            }
            public boolean isCanAttackDoor()
            {
                return _canAttackDoor;
            }
            public int getChance(int a)
            {
                return _chanceList.get(a);
            }
        }
        public enum ActionType
        {
            /**
             * Field ATTACK.
             */
            ATTACK,
            /**
             * Field DEBUFF.
             */
            DEBUFF,
            /**
             * Field CANCEL.
             */
            CANCEL,
            /**
             * Field HEAL.
             */
            HEAL
        }
        private int _id;
	    /**
	     * Field _level.
	     */
	    private int _level;
	    /**
	     * Field _delay.
	     */
	    private int _delay;
	    /**
	     * Field _skills.
	     */
	    private List _skills = new ArrayList(3);
        public CubicTemplate(int id, int level, int delay)
        {
            _id = id;
            _level = level;
            _delay = delay;
        }
        public void putSkills(int chance, List<SkillInfo> skill)
	    {
		    _skills.add(new AbstractMap.SimpleImmutableEntry(chance, skill));
	    }
        public Iterable getSkills()
        {
            return _skills;
        }
        public int getDelay()
        {
            return _delay;
        }
        public int getId()
        {
            return _id;
        }
        public int getLevel()
        {
            return _level;
        }
    }
}
